﻿@model yq.WebModel.Sys.DepartmentEidt

@using (Ajax.BeginForm("DoEditDepartment", new { }, new AjaxOptions { HttpMethod = "post", OnSuccess = "InitializeTips" }, new { style = " margin-bottom:0px " }))
{ 
    @Html.HiddenFor(obj => obj.DepartmentId)
    <div>
        <table class="table table-condensed"  width="400px" style=" margin-bottom:0px ">
            <tbody>
                <tr>
                    <td>
                        @(Html.RawFor(obj => obj.Title))
                    </td>
                    <td>
                        @Html.TextBoxFor(obj => obj.Title)
                    </td>
                </tr>

                <tr>
                    <td>
                        @(Html.RawFor(obj => obj.SuperiorDep))
                    </td>
                    <td>
                      @Model.SuperiorDepName
                    </td>
                </tr>
            
                 <tr>
                    <td>
                       
                    </td>
                    <td>
                
                    </td>
                </tr>
                 <tr>
                    <td>
                       
                    </td>
                    <td>
                      @Html.Submit("保 存", new { id = "EditDepSubmit" })
                    </td>
                </tr>


            </tbody>
        </table>
    </div>
}
<script>

    function InitializeTips(obj) {
        if (obj.Status == 1) {
            $.tips("保存成功");
           getCurrentDialog($("#EditDepSubmit")).close();
        } else {
            $.tips(obj.ErrorText);
        }
    }

</script>
